<html lang="zh">
<head>
    <link href="visualPages.css" rel="stylesheet">
    <title> Data Structure Visualization </title>
    <meta charset="UTF-8">
    <link href="favicon.ico" rel="shortcut icon"/>
</head>
<body>

<div class="container">
    <div class="header"><h1>Data Structure Visualizations</h1></div>
    <div class="menu">
        <ul>
            <li><a href="about.html">About</a></li>
            <li><a href="Algorithms.html">Algorithms</a></li>
            <li><a href="faq.html"> F.A.Q </a></li>
            <li><a href="bugfeature.html"> Known Bugs /<br> &nbsp; &nbsp; Feature Requests </a></li>
            <li><a href="java/visualization.html"> Java Version </a></li>
            <li><a href="flash.html">Flash Version </a></li>
            <li><a href="source.html">Create Your Own /<br> &nbsp; &nbsp; Source Code</a></li>
            <li><a href="contact.html"> Contact </a></li>
        </ul>

        <br> <br>
        <div class="about">
            <a href="http://www.cs.usfca.edu/galles"> David Galles </a> <br>
            <a href="http://www.cs.usfca.edu"> Computer Science </a> <br>
            <a href="http://www.usfca.edu"> University of San Francisco </a>
        </div>

    </div>

    <div class="content">

        <h1> Frequently Asked Questions </h1>

        <ol>
            <li> Sometimes when I insert a element into a BST or other ordered data structure, I get strange behavior --
                "-2" seems to be <em>smaller</em>
                than "-3". What's going on?
            </li>

            <ul>
                <li> We use string comparisons for everything, so "-2" is in fact less than "-3" lexicographically.
                    We tried to mitigate confusion somewhat by automatically converting positive integers into
                    equivalent numbers with leading zeroes,
                    so that positive integers would always be ordered as expected (though negative numbers are alas
                    off).
                    It turns out that if you are trying to sort a group of any strings, using a mixed comparison
                    strategy gets confusing
                    fast -- how should 10.4 compare to 3.1.2? What about 3A -- is that a string or a hexidecimal number?
                    What about AF? Should BC come before or after AFF? We made the executive decision to just do string
                    comparisons everywhere
                    for consitency.
            </ul>


            <li> How can I get this to work on my cellphone, which has a very small screen?</li>

            <ul>
                <li>
                    If you change the canvas size to something that seems reasonable for your device, we will use a
                    cookie to remember your
                    preferred size. Then reload the page, and you should be set! Cell Phones are a little tricky, since
                    their screens are so
                    small -- the iPhone 4 seems to work well for most algorithms, with a width of 500 and a height of
                    300 (though the
                    sorting algorithms really require a width of 900 to see everything, and graph algorithms need a
                    width of 1000 to see
                    everything.) With iOS devices, you can set the canvas size to a larger value than can be dipslayed
                    at once, though
                    you will then need to do a bit of zooming in/out or scrolling.
                </li>
            </ul>

            <li> Wait ... you are using cookies?</li>
            <ul>
                <li>
                    Only for remembering your preferred width/height/speed. Everything will still work if you disable
                    cookies, you just
                    won't get the extra convienence of having the exact right size for your device. We aren't doing
                    tracking of any kind.
                </li>
            </ul>

            <li> I think I've found a bug ...
                <ul>
                    <li> Please email me any bug reports, at galles &lt;at&gt; usfca &lt;dot&gt; edu. The more specific,
                        the better (that is,
                        excatly what sequence of operations lead to the undesired behavior).

                </ul>


            <li> Can I use these materials in my classes?
                <ul>
                    <li> Certainly! I'd prefer that you just link to my pages rather than cache anything locally so that
                        your
                        students will get the most up-to-date version of everything. If you do use this in your class,
                        please drop me
                        a line to let me know about it, I'm curious to see who else will find this useful.

                </ul>

            <li> Can I use this material as a base for my own visualizations?</li>
            <ul>
                <li> Yes! See the <a href="source.html">source code</a> page for a simple tutorial and a tarball with
                    everything you need.
                    Note that updates to the source code release are not made as quickly as updates to the
                    visualziations themselves,
                    so not all of the visualziations may be in the tarball at any given time. I plan to update the
                    source code at
                    least once a month or so, so it shouldn't get too far out of date. If you do use my code,
                    please leave in the copyright information at the beginning of each source file, and put a link to
                    these pages from the page
                    where your visualizations are located. If you create something really cool, let me know and I can
                    link to it.
                </li>
            </ul>


            <li> What's next?</li>
            <ul>
                <li> Converting the remainder of the java-only visualziations to javascript (only Huffman Coding and
                    lists left!)
                </li>
                <li> Adding a suite of simple recursion visualziations (factorial, reversing a list, generic tree
                    operations, etc).
                    Similar to the <a href="DPFib.html">Dynamic Programming: Fibonacci</a> visualziation, but with some
                    more detail
                    (contents of the call stack, etc)
                </li>
                <li> Adding more Dynamic Programming visualziations</li>
                <li> Adding visualzations of translations and rotations of simple objects (in 2D, or 3D if I'm feeling
                    ambitious).
                    Mostly because those visualziations would be handy for my Game Engineering classes.
                </li>

            </ul>


        </ol>
        <br>
        <br>
        <br>


    </div>
    <div class="footer">Copyright 2011 <a href="http://www.cs.usfca.edu/galles">David Galles </a></div>

</div>

</body>
</html>
